package router

import (
	"crow-docker/web"
	"github.com/gin-gonic/gin"
)

func crowIndex(c *gin.Context) {
	c.Writer.WriteHeader(200)
	b, _ := web.Content.ReadFile("index.html")
	_, _ = c.Writer.Write(b)
	c.Writer.Header().Add("Accept", "text/html")
	c.Writer.Flush()
}

func crowDockerExec(c *gin.Context) {
	c.Writer.WriteHeader(200)
	b, _ := web.Content.ReadFile("crow-docker-exec.html")
	_, _ = c.Writer.Write(b)
	c.Writer.Header().Add("Accept", "text/html")
	c.Writer.Flush()
}

func crowDockerLogs(c *gin.Context) {
	c.Writer.WriteHeader(200)
	b, _ := web.Content.ReadFile("crow-docker-logs.html")
	_, _ = c.Writer.Write(b)
	c.Writer.Header().Add("Accept", "text/html")
	c.Writer.Flush()
}
